<template>
  <el-table-column label="状态" prop="onlineStatus" min-width="150">
    <template #default="scope">
      {{formatStatus(scope.row.onlineStatus)}}
    </template>
  </el-table-column>
</template>

<script setup lang="ts">
const formatStatus = (val:number) => {
  if (val === 1) {
    return '上线'
  }

  if (val === 0) {
    return '下线'
  }
}
</script>
